<form id="form_galeria" action="" method="post">
    <input type="hidden" name="id" value="<?php echo $this->result->GAL_ID; ?>" />
    <table id="tlist" class="tb_content">
        <tr> 
            <td width="40" style="height: 50px;" >
                <label>Título</label>
            </td>
            <td width="100">
                <input type="text" name="titulo" value="<?php echo $this->result->GAL_NOM; ?>" />
            </td>  
        </tr>
        <tr> 
            <td colspan="2">
                <label><input type="radio" name="tamanho" value="N" <?php if($this->result->GAL_TAM == 'N') echo 'checked=""'; ?> /> Foto Normal</label>
                &nbsp;&nbsp;
                <label><input type="radio" name="tamanho" value="D" <?php if($this->result->GAL_TAM == 'D') echo 'checked=""'; ?> /> Foto Destaque</label>
            </td>  
        </tr>
        <tr> 
            <td colspan="2" >
                <a class="btn-button btn-cancel" style="float: right;" href="javascript:void(0)" onclick="$('#dialog').dialog('close');" >Cancelar</a>
                <input type="submit" name="submit" style="float: right;" value="Enviar" class="btn-button btn-ok">
            </td>
        </tr>
    </table>
</form>
<script>
$(function(){
    
    $('#form_galeria').submit(function(){
        $.post(URLBASE+'/'+CONTROL+'/edit', $(this).serialize(), function(data){                  
           if(data.ok)
           {
               $('#cnt_gl_'+data.id).html(data.html);
               $("#dialog").dialog('close');
           }   
        }, 'json'); 
        return false; 
    });
});
</script>    
